<html>
<head><meta charset="utf-8"><title>Is `mir::Constant::ty` useless? · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Is.20.60mir.3A.3AConstant.3A.3Aty.60.20useless.3F.html">Is `mir::Constant::ty` useless?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="165067155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Is%20%60mir%3A%3AConstant%3A%3Aty%60%20useless%3F/near/165067155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Is.20.60mir.3A.3AConstant.3A.3Aty.60.20useless.3F.html#165067155">(May 07 2019 at 12:45)</a>:</h4>
<p>I remember that a while ago the <code>ty</code> field of <code>mir::Constant</code> had an actual use case, but I think at some point the inner <code>ty::Const</code>'s <code>ty</code> field has become synchronized with the <code>ty</code> field. I think we should run an experiment and just outright remove the <code>mir::Constant::ty</code> field</p>



<a name="171523225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Is%20%60mir%3A%3AConstant%3A%3Aty%60%20useless%3F/near/171523225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Is.20.60mir.3A.3AConstant.3A.3Aty.60.20useless.3F.html#171523225">(Jul 23 2019 at 14:24)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="214307">@Saleem Jaffer</span> I wasn't able to find the list of TODOs, but I found this in the meantime ;)</p>



<a name="171523309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Is%20%60mir%3A%3AConstant%3A%3Aty%60%20useless%3F/near/171523309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Saleem Jaffer <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Is.20.60mir.3A.3AConstant.3A.3Aty.60.20useless.3F.html#171523309">(Jul 23 2019 at 14:25)</a>:</h4>
<p>Cool! I'll check this out.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>